-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop requesting room keys from other users #2982
Stop requesting room keys from other users #2982
Conversation
We have some tests that check if receiving a forwarded room key works. These claim to use the same user id, but in fact they change the user id in the last moment before the event is passed into the client. Let's change this so we're always operating with the same user id.
We never accept such room keys, so there isn't a point in requesting them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks generally good to me, modulo a few suggestions/nits as below.
The logic in shouldAcceptForwardedKey
seems a little bit magical and I'm not entirely convinced we have comprehensive tests for it: it might be nice to make sure we do. But I'll not insist if you need to move on to other things.
Co-authored-by: Richard van der Hoff <[email protected]>
Fixes: element-hq/element-web#23766 |
@richvdh would be worth updating the OP otherwise github won't auto-close |
…est-room-keys-from-other-users
I think that this has addressed all the issues and I merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Adding back to the merge queue after the change that I am hoping fixes the quality metrics. |
Requesting forwarded room keys from other users is quite pointless since we don't accept them. This mainly produces unnecessary to-device traffic.
The main commit in this PR is the third one, where we finally remove the requesting of room keys from other users. The previous commits are refactors of the forwarded room key handling and unit tests validating the forwarded room key handling.
Fixes: element-hq/element-web#23766
Fixes: element-hq/element-web#24681
This change is marked as an internal change (Task), so will not be included in the changelog.